package org.aepscolombia.platform.models.entity;
// Generated Jan 13, 2014 2:36:33 PM by Hibernate Tools 3.2.1.GA


import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * GrowingEnvironment generated by hbm2java
 */
@Entity
@Table(name="growing_environment"
    ,catalog="madr_bd10"
)
public class GrowingEnvironment  implements java.io.Serializable {


     private int idGroEnv;
     private String nameGroEnv;
     private Set genotypeses = new HashSet(0);
     private Set beanses = new HashSet(0);

    public GrowingEnvironment() {
    }

	
    public GrowingEnvironment(int idGroEnv, String nameGroEnv) {
        this.idGroEnv = idGroEnv;
        this.nameGroEnv = nameGroEnv;
    }
    public GrowingEnvironment(int idGroEnv, String nameGroEnv, Set genotypeses, Set beanses) {
       this.idGroEnv = idGroEnv;
       this.nameGroEnv = nameGroEnv;
       this.genotypeses = genotypeses;
       this.beanses = beanses;
    }
   
     @Id 
    
    @Column(name="id_gro_env", unique=true, nullable=false)
    public int getIdGroEnv() {
        return this.idGroEnv;
    }
    
    public void setIdGroEnv(int idGroEnv) {
        this.idGroEnv = idGroEnv;
    }
    
    @Column(name="name_gro_env", nullable=false, length=45)
    public String getNameGroEnv() {
        return this.nameGroEnv;
    }
    
    public void setNameGroEnv(String nameGroEnv) {
        this.nameGroEnv = nameGroEnv;
    }
@ManyToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY)
    @JoinTable(name="genotypes_growing_environments", catalog="madr_bd10", joinColumns = { 
        @JoinColumn(name="id_growing environment_gen_gro_env", nullable=false, updatable=false) }, inverseJoinColumns = { 
        @JoinColumn(name="id_genotype_gen_gro_env", nullable=false, updatable=false) })
    public Set getGenotypeses() {
        return this.genotypeses;
    }
    
    public void setGenotypeses(Set genotypeses) {
        this.genotypeses = genotypeses;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="growingEnvironment")
    public Set getBeanses() {
        return this.beanses;
    }
    
    public void setBeanses(Set beanses) {
        this.beanses = beanses;
    }




}


